
<?php

/**
 * @Entity
 * @Table(name="user")
 */

class User {



	/**
	 * @Id
	 * @Column(name="e_mail", type="string", length=50, nullable=false)
	 */
	private $eMail;

	/**
	 * @Column(name="password", type="string", length=50, nullable=false)
	 */
	private $password;

	/**
	 * @Column(name="name", type="string", length=50, nullable=false)
	 */
	private $name;

	/**
	 * @Column(name="points", type="integer", length=11, nullable=false)
	 */
	private $points;

	function User($user){
		$this->setPoints($user["points"]);
		$this->setName($user["name"]);
		$this->setPassword($user["password"]);
		$this->setEMail($user["e_mail"]);
	}

	public function getEMail() 
	{
		return $this->eMail;
	} 

	public function setEMail($eMail) 
	{
		$this->eMail = $eMail;
	} 

	public function getPassword() 
	{
		return $this->password;
	} 

	public function setPassword($password) 
	{
		$this->password = $password;
	} 

	public function getName() 
	{
		return $this->name;
	} 

	public function setName($name) 
	{
		$this->name = $name;
	} 

	public function getPoints() 
	{
		return $this->points;
	} 

	public function setPoints($points) 
	{
		$this->points = $points;
	} 

	public static function dbGetUsers($where){
		return dbGet("User", "user", $where);
	}
}
?>